﻿Imports System.Windows.Forms

Public Class DlgHlp
    Dim mouseOffset As Point
    Private Sub BtnCls_Click(sender As Object, e As EventArgs) Handles BtnCls.Click
        Me.Close()
    End Sub


    Private Sub PictTitle_MouseDown(sender As Object, e As MouseEventArgs) Handles PnlTitle.MouseDown
        mouseOffset = New Point(-e.X, -e.Y)
    End Sub

    Private Sub PictTitle_MouseMove(sender As Object, e As MouseEventArgs) Handles PnlTitle.MouseMove
        If e.Button = MouseButtons.Left Then
            Dim mousePos = Control.MousePosition
            mousePos.Offset((mouseOffset.X), (mouseOffset.Y))
            Location = mousePos
        End If
    End Sub

    Private Sub DlgHlp_Load(sender As Object, e As EventArgs) Handles Me.Load
        PnlTitle.BackColor = MyColor
        BtnCls.FlatAppearance.MouseOverBackColor = ControlPaint.Light(MyColor)
    End Sub
End Class
